﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp1.Commons
{
    public class NotifyBase : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public void DoNotify([CallerMemberName] string propName = "")
        { 
            //PropertyChanged事件不为空时执行后面的委托
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
        }
    }
}
